package com.easygem.common.model.front;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * @author 文晓平
 * @version 1.0
 * @Description 系统通知
 * @date 2024/12/21 0:09
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("")
@Table(name = "`sys_notice`")
@Alias("FrontSysNotice")  // 👈 修改此处
public class SysNotice {
    @Id
    @Column(name = "`noticeId`")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer noticeId;

    @Column(name = "`title`")
    private String title;

    @Column(name = "`noticeContent`")
    @ApiModelProperty("")
    private String noticeContent;

    @Column(name = "`level`")
    @ApiModelProperty("")
    private Integer level;

    @Column(name = "`isRead`")
    @ApiModelProperty("0:未读1：已读")
    private Integer isRead;


    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "`createTime`")
    @ApiModelProperty("")
    private Timestamp createTime;

    @Column(name = "`isPublish`")
    @ApiModelProperty("0:不发布 1:发布")
    private Integer isPublish;

    @Column(name = "`userId`")
    @ApiModelProperty("")
    private Long userId;

    @Column(name = "`remark`")
    @ApiModelProperty("")
    private String remark;


    @TableField(exist = false)
    private transient String userName;

    @TableField(exist = false)
    private transient String accountName;


}
